//
//  FriendListHader.m
//  Safflower
//
//  Created by 袁亮 on 2016/12/5.
//  Copyright © 2016年 Migic_Z. All rights reserved.
//

#import "FriendListHeader.h"

@implementation FriendListHeader

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.backgroundColor = [UIColor whiteColor];
        [self makeFriendListHeaderViewUI];
    }
    return self;
}

- (void)makeFriendListHeaderViewUI
{
    
    CGFloat labelWidth = (SCREEN_WIDTH - 120) / 3;
    
    UILabel *username = [UILabel new];
    username.textColor = [UIColor blackColor];
    username.font = [UIFont systemFontOfSize:18.0f];
    username.text = @"用户名";
    [self addSubview:username];
    [username mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.bottom.mas_equalTo(0);
        make.left.mas_equalTo(80);
        make.width.mas_equalTo(labelWidth);
    }];
    
    UILabel *flowerNumber = [UILabel new];
    flowerNumber.textColor = [UIColor blackColor];
    flowerNumber.font = [UIFont systemFontOfSize:18.0f];
    flowerNumber.text = @"红花数";
    [self addSubview:flowerNumber];
    [flowerNumber mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.bottom.mas_equalTo(0);
        make.left.mas_equalTo(username.mas_right).mas_offset(0);
        make.width.mas_equalTo(labelWidth - 30);
    }];
    
    UILabel *giftNumber = [UILabel new];
    giftNumber.textColor = [UIColor blackColor];
    giftNumber.font = [UIFont systemFontOfSize:18.0f];
    giftNumber.text = @"送出礼物";
    [self addSubview:giftNumber];
    [giftNumber mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.bottom.mas_equalTo(0);
        make.left.mas_equalTo(flowerNumber.mas_right).mas_offset(0);
        make.width.mas_equalTo(labelWidth - 30);
    }];
}

@end
